home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 7 / 64er_Magazin_Sonderheft_07_86-07_1986_Markt__Technik_de_Side_A.d64 / listing 1 basic (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  673b  |  30 lines

  1. 10 c=56328
  2. 20 poke c+14,peek(c+14) or 128
  3. 30 poke c+15,peek(c+15) and 127
  4. 40 input "zeit hhmmss";a$
  5. 50 if len(a$)<>6 then 40
  6. 60 h=val(left$(a$,2))
  7. 70 m=val(mid$(a$,3,2))
  8. 80 s=val(right$(a$,2))
  9. 100 if h>12 then h=h+68
  10. 110 pokec+3,16*int(h/10)+h-int(h/10)*10
  11. 130 pokec+2,16*int(m/10)+m-int(m/10)*10
  12. 150 pokec+1,16*int(s/10)+s-int(s/10)*10
  13. 160 poke c,0
  14. 180 print"[147]"
  15. 200 c=56328
  16. 210 h=peek(c+3):m=peek(c+2):s=peek(c+1):t=peek(c)
  17. 230 f=0:if h>32 then h=h-128:f=1
  18. 240 h=int(h/16)*10+h-int(h/16)*16:if f=0 then 280
  19. 250 if h=12 then 290
  20. 260 h=h+12
  21. 280 if h=12 then h=0
  22. 290 m=int(m/16)*10+m-int(m/16)*16
  23. 300 s=int(s/16)*10+s-int(s/16)*16
  24. 320 t$=right$("0"+mid$(str$(h),2,2),2)+":"
  25. 340 t$=t$+right$("0"+mid$(str$(m),2,2),2)+":"
  26. 360 t$=t$+right$("0"+mid$(str$(s),2,2),2)+":"
  27. 380 t$=t$+right$(str$(t),1)
  28. 400 print"";t$
  29. 420 goto 210
  30.